Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EDSC-3951: Update GraphQL queries to use new params parameter objects #1706

Merged
merged 16 commits into from
Jan 30, 2024

Conversation

Bccorb
Copy link
Contributor

@Bccorb Bccorb commented Jan 8, 2024

Overview

What is the feature?

Updated some lingering graphQL requests to use the params attribute with supported types.

What is the Solution?

Updated GraphQL queries and calls.

What areas of the application does this impact?

Impacts Project view, main search view, and focused collection view.

Testing

Reproduction steps

  • Performed outline regression tests in compared by Prod and Dev.

Attachments

None.

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

SIDEBAR - SEEKING FEEDBACK

  • I had to remove hasGranuleCounts from the query as that wasn't a type of either param. I want to have someone take a look at that in detail and let me know, if there is a way to add that back or is it depreciated anyway?

Copy link

codecov bot commented Jan 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f490989) 91.96% compared to head (b41123d) 91.96%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1706   +/-   ##
=======================================
  Coverage   91.96%   91.96%           
=======================================
  Files         725      725           
  Lines       19395    19395           
  Branches     4574     4575    +1     
=======================================
  Hits        17837    17837           
  Misses       1422     1422           
  Partials      136      136           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Bccorb Bccorb marked this pull request as ready for review January 18, 2024 15:02
@@ -350,12 +340,15 @@ export const getProjectCollections = () => async (dispatch, getState) => {
}`

const response = graphQlRequestObject.search(graphQuery, {
ids: filteredIds,
includeTags: defaultCmrSearchTags.join(','),
includeGranuleCounts,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this was being used in graphql so I agree it seems fine to remove

limit: $limit,
cursor: $cursor
) {
query SearchCollections($params: CollectionsInput) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this function might be OBE I don't see any way to access it on the controller and its not called anywhere else

temporal: $temporal
twoDCoordinateSystem: $twoDCoordinateSystem
) {
query GetGranuleLinks( $params: GranulesInput ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am seeing an issue on this one where we can't get the granule downloads due to this causing a 500 error. To replicate: Find a collection add some granules to project use the Download option. Normally we get the granules links on the results page but, its erroring out

Copy link
Contributor

@eudoroolivares2016 eudoroolivares2016 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a commit that seems to fix the issue locally. We needed to wrap the request in a params object but, also there were issues calling the (prepareGranuleAccessParams(granuleParams) because the pageSize field is not defined for granules in graphql. See https://github.com/nasa/cmr-graphql/blob/main/src/types/granule.graphql

Copy link
Contributor

@eudoroolivares2016 eudoroolivares2016 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blocking step as I need to update the sprint in bamboo after merges get done

@eudoroolivares2016 eudoroolivares2016 dismissed their stale review January 30, 2024 14:30

not relevant anymore

@Bccorb Bccorb merged commit ee357c2 into main Jan 30, 2024
11 checks passed
@Bccorb Bccorb deleted the EDSC-3951 branch January 30, 2024 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants